/*
* SMILParser
*
* Version 1.0
*
* Programmers: Jesse Louderback, Noah Pham, Chad Carpenter, and Marc Hindman
*/
package comm;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

import com.SmilDial.InboxMenu;
import com.SmilDial.R;

public class Notify {
	final int NOTICE_ID = 0x5AA11;
	NotificationManager notificationMgr;
	Notification note;
	Context context;
	public Notify(Context c, NotificationManager noteMgr) {
		notificationMgr = noteMgr;
		context = c;
	}
	public void sendNotice(String title, String text, String fileName) {
		Notification notification = new Notification(R.drawable.smildial, null,
													 System.currentTimeMillis());
		Intent intent = new Intent(context, InboxMenu.class); 
		intent.putExtra("file", fileName);
		PendingIntent contentIntent = PendingIntent.getActivity(context, 0, intent, 0);
		notification.setLatestEventInfo(context, title, text, contentIntent);
		notification.flags = Notification.DEFAULT_LIGHTS | Notification.FLAG_AUTO_CANCEL;
		notificationMgr.notify(NOTICE_ID, notification);
	}
	public Context getContex() {
		return context;
	}
}
